Skip to content

Conversation

@jatgarg
Copy link
Contributor

@jatgarg jatgarg commented Sep 29, 2025

build(client): Tag asserts for release 2.62.0

@jatgarg jatgarg self-assigned this Sep 29, 2025
@jatgarg jatgarg requested a review from a team as a code owner September 29, 2025 20:28
Copilot AI review requested due to automatic review settings September 29, 2025 20:28
@github-actions github-actions bot added area: dds Issues related to distributed data structures area: dds: tree area: runtime Runtime related issues base: main PRs targeted against main branch labels Sep 29, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR tags assert statements for release 2.62.0 by updating assert calls to use hexadecimal error codes instead of string messages. The changes also remove old assert error messages from the short codes map that are no longer used and add new assert error messages that correspond to the newly tagged assertions.

  • Updates assert statements to use hexadecimal error codes for better tracking and consistency
  • Removes unused assert error messages from the shortCodeMap
  • Adds new assert error messages that correspond to the newly tagged assertions

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/runtime/test-runtime-utils/src/assertionShortCodesMap.ts Updates shortCodeMap by removing unused entries and adding new assert error codes
packages/dds/tree/src/shared-tree/treeCheckout.ts Updates assert to use hex code 0xc55 for transaction branch switching check
packages/dds/tree/src/shared-tree/treeAlpha.ts Updates assert to use hex code 0xc54 for leaf value validation
packages/dds/tree/src/shared-tree-core/sharedTreeCore.ts Updates asserts to use hex codes 0xc67 and 0xc68 for commit rollback and branch registration
packages/dds/tree/src/shared-tree-core/messageCodecV5.ts Updates assert to use hex code 0xc66 for commit message revision validation
packages/dds/tree/src/shared-tree-core/messageCodecV1ToV4.ts Updates asserts to use hex codes 0xc64 and 0xc65 for message type validation
packages/dds/tree/src/shared-tree-core/editManagerCodecsV5.ts Updates asserts to use hex codes 0xc61, 0xc62, and 0xc63 for summary encoding validation
packages/dds/tree/src/shared-tree-core/editManagerCodecsCommons.ts Updates asserts to use hex codes 0xc5e, 0xc5f, and 0xc60 for branch encoding/decoding validation
packages/dds/tree/src/shared-tree-core/editManager.ts Updates asserts to use hex codes 0xc56-0xc5d for branch management validation
packages/dds/tree/src/core/rebase/utils.ts Updates assert to use hex code 0xc69 for branch relationship validation

"0xabe": "Child changes must be in order.",
"0xabf": "Duplicate codecs specified.",
"0xac0": "Encoded schema should validate",
"0xac1": "Encoded schema should validate",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still in use: it should not have been removed. Looks like assert tagging might have been broken for fail?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tree has a config in assertTagging.config.mjs which should enable assert tagging for fail, but it seems like that broke. We should look at what changes were made to the assert taking implementation recently. Was there a update to build tools integrated recently?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I run tagging it works fine for me.

How did you perform this tagging?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used pnpm run policy-check:asserts which functioned correctly.

When doing automated changes like this, it's good to include how you did it in the PR description so that can be checked for issues.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My version, with a workaround for the failing test, is in #25580

@jatgarg jatgarg closed this Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: dds: tree area: dds Issues related to distributed data structures area: runtime Runtime related issues base: main PRs targeted against main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants